import os
import sys
from .date import getDateArg
import time
import common.index as common

hasOutPutFileName = None


def getTestingFileName(username=None):
    date = getDateArg()
    fname = "words" + date + ".txt"
    if hasOutPutFileName is None:
        common.lineLog("Hello %s ,you are testing %s." % (username, fname))
        hasOutPutFileName = True
    return fname


def getFileNameToo():
    # date = sys.argv[1]
    month_date = time.strftime("%m%d")
    if len(sys.argv) >= 2:
        fname = "words" + sys.argv[1] + ".txt"
    else:
        fname = "words" + month_date + ".txt"
    return fname


def checkExists(fileName, isTips=True):
    exists = os.path.exists(fileName)
    if not exists and isTips:
        print(fileName, "is not found!")
    return exists


if __name__ == "__main__":
    print("test code place here")
